//
//  TourPlaceCollectionViewCell.m
//  EDPS
//
//  Created by Neil on 15/11/27.
//  Copyright © 2015年 张维扬. All rights reserved.
//

#import "TourPlaceCollectionViewCell.h"
#import "TourPlaceTableViewCell.h"

@implementation TourPlaceCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatTableView];
    }
    return self;
}

#pragma mark - 创建tableView
- (void)creatTableView
{
    self.tableView = [[UITableView alloc]initWithFrame:self.contentView.frame style:UITableViewStylePlain];
    [self.tableView registerClass:[TourPlaceTableViewCell class] forCellReuseIdentifier:@"cell"];
    
    [self.contentView addSubview:self.tableView];
    
}

#pragma mark - 位置信息
-(void)layoutSubviews
{
    [super layoutSubviews];
    
    
    self.tableView.frame = self.contentView.frame;
}


#pragma mark - 代理
- (void)setDataDelegate:(id<UITableViewDataSource>)dataDelegate
{
    self.tableView.dataSource = dataDelegate;
}

- (void)setDelegate:(id<UITableViewDelegate>)delegate
{
    self.tableView.delegate = delegate;
}




/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
